/*
 * @author Jordi Mateo
 * @author Sergi Builtrago
 * @author Marc Gonzalez
 * @author Aitor Garcia
 * @version 23.12.2012
 */

package com.example.project;

import android.content.Intent;
import android.view.View;
import android.widget.AdapterView;
import android.widget.Toast;
import android.widget.AdapterView.OnItemClickListener;

public class GridItemClicker  implements OnItemClickListener{

	private Intent c;

	@Override
	public void onItemClick(AdapterView<?> adapter, View v, int position, long l) {
		switch(position){
		case 0:
			Toast.makeText(v.getContext(), R.string.not_implemented, Toast.LENGTH_SHORT).show();
	    break;
        case 1:
        	Toast.makeText(v.getContext(), R.string.not_implemented, Toast.LENGTH_SHORT).show();
        break;
        case 2:
        	c = new Intent(v.getContext(), OnMenjar.class);
        	v.getContext().startActivity(c);
        break;
        case 3:
        	Toast.makeText(v.getContext(), R.string.not_implemented, Toast.LENGTH_SHORT).show();
            break;
        case 4:
        	Toast.makeText(v.getContext(), R.string.not_implemented, Toast.LENGTH_SHORT).show();
            break;
        case 5:
        	Toast.makeText(v.getContext(),R.string.not_implemented, Toast.LENGTH_SHORT).show();
        	break;
        	
        case 6:
        	Toast.makeText(v.getContext(), R.string.not_implemented, Toast.LENGTH_SHORT).show();
        	break;
        	
        case 7:
        	Toast.makeText(v.getContext(), R.string.not_implemented, Toast.LENGTH_SHORT).show();
        	break;

        case 8:
        	c = new Intent(v.getContext(), Historia.class);
        	v.getContext().startActivity(c);
        	break;
		}
	}
}
